﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ORS.OrderRobot.EFCore.Migrations
{
    /// <inheritdoc />
    public partial class c_4 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CloseShopping",
                table: "SystemConfigs");

            migrationBuilder.DropColumn(
                name: "MaxThread",
                table: "SystemConfigs");

            migrationBuilder.RenameColumn(
                name: "MointerProductFeatureJson",
                table: "SystemConfigs",
                newName: "PresetRequestHeaderJson");

            migrationBuilder.AddColumn<string>(
                name: "AutoShoppingTaskJson",
                table: "SystemConfigs",
                type: "longtext",
                nullable: false)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "MointerProductJson",
                table: "SystemConfigs",
                type: "longtext",
                nullable: false)
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "AutoShoppingTaskJson",
                table: "SystemConfigs");

            migrationBuilder.DropColumn(
                name: "MointerProductJson",
                table: "SystemConfigs");

            migrationBuilder.RenameColumn(
                name: "PresetRequestHeaderJson",
                table: "SystemConfigs",
                newName: "MointerProductFeatureJson");

            migrationBuilder.AddColumn<bool>(
                name: "CloseShopping",
                table: "SystemConfigs",
                type: "tinyint(1)",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<int>(
                name: "MaxThread",
                table: "SystemConfigs",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }
    }
}
